﻿namespace Digitalmes.Domain.Entities.Mes;

/// <summary>
/// 计划班次
/// </summary>
[SugarTable("cal_shift")]
public sealed class CalShift : AuditedEntity
{
    /// <summary>
    /// 计划 ID
    /// </summary>
    public long PlanId { get; set; }

    /// <summary>
    /// 排班计划
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(PlanId))]
    public CalPlan? CalPlan { get; set; }

    /// <summary>
    /// 班次名称
    /// </summary>
    [NotNull]
    public string? Name { get; set; }

    /// <summary>
    /// 开始时间
    /// </summary>
    [NotNull]
    public string? StartTime { get; set; }

    /// <summary>
    /// 结束时间
    /// </summary>
    [NotNull]
    public string? EndTime { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    public int Sort { get; set; }

    public bool IsDeleted { get; set; }
}
